<template>
	<view class="return-page" @click="props.onBack">
		<image src="/src/static/return.png" mode="" class="return-page-img"></image>
		<text class="return-page-text">{{props.title}}</text>
	</view>
</template>

<script setup>
import { ref } from 'vue'

const props = defineProps({
	title: {
		type: String,
		default: '首页'
	},
	onBack: {
		type: Function,
		default: () => {
			uni.navigateTo({
				url: '/views/match-query/match-query'
			})
		}
	}
})
const emit = defineEmits(['on-back'])

</script>

<style lang="scss" scoped>
.return-page {
	display: flex;
	align-items: center;
	padding: 8rpx;
	padding-bottom: 0;
	.return-page-img {
		width: 30rpx;
		height: 30rpx;
		margin-right: 6rpx;
	}
	.return-page-text {
		color: #384A58;
		font-size: 14rpx;
		font-weight: 500;
	}
}
</style>